package vn.nt.healthcare.server.ws.repositories;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import vn.nt.healthcare.server.ws.domain.Company;
@Repository
public interface CompanyRepository extends JpaRepository<Company, String> {

	Company findByCode(String code);
	@Query("SELECT DISTINCT c FROM Company c WHERE c.user.uuid = ?1")
	List<Company> findByUuid(String uuid);	
}
